home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1997 July
/
EnigmA AMIGA RUN 20 (1997)(G.R. Edizioni)(IT)[!][issue 1997-07 & 08][EAR-CD IV].iso
/
lightwave
/
plugins
/
gonzalomacros
/
install-macros-v1.2
< prev
next >
Wrap
Text File
|
1996-07-15
|
9KB
|
406 lines
;**********************************************************
;
; Gonzalo Garramuño's Macro Compilation Installer
;
; by Gonzalo Garramuño
; © 1996 Gonzalo Garramuño
;
;$VER: Gonzalo Garramuño's Macro Compilation Installer 1.0
;
;**********************************************************
;************* Initialize **************
(set @app-name "Gonzalo Garramuño's Macro Compilation")
(set @user-level 1)
(set drive_macros
(if (= 2 (exists "Gonzalo:" (noreq)))
(pathonly (getassign "Gonzalo"))
(if (= 2 (exists "REXX:Modeler" (noreq)))
"REXX:Modeler"
"Toaster:ARexx_Examples/lwm"
)
)
)
(set drive_macrolist
(if (= 2 (exists "GonzaloList:" (noreq)))
(getassign "GonzaloList")
(if (= 2 (exists "Toaster:Programs/Lightwave_Support" (noreq)))
"Toaster:Programs/Lightwave_Support"
"Toaster:3D"
)
)
)
(set guide_dir
(if (= 2 (exists "Toaster:Programs/Documentation" (noreq)))
"Toaster:Programs/Documentation"
(if (= 2 (exists "Work:" (noreq)))
"Work:"
(cat (getdevice "c:") ":")
)
)
)
(set @default-dest drive_macros)
(set source_dir (cat (pathonly @icon)))
(set slash
(if (= ":" (substr source_dir (- (strlen source_dir) 1) 1))
""
"/"
)
)
(set source_dir (cat source_dir slash))
;****** Help Messages ******
(set help_msg1
(cat "The Installer needs to know where you would like to "
"install the macros.\n\nFor LW 4.0+, you will probably "
"want to choose 'REXX:Modeler', while for LW 3.5, "
"you probably want to choose "
"'Toaster:ARexx_Examples/lwm'.\n\n"
"The installer will create a directory called "
"'Gonzalo' (if it does not exist already), where it "
"will put all of the macros."
)
)
(set help_msg2
(cat "The Installer needs to know where to install the "
"GonzaloMacroList file. The Amigaguide help file "
"will also be installed here.\n\n"
"On LW 4.0, the standard place for the macrolist is "
"'Toaster:Programs/Lightwave_Support'. "
"For LW 3.5, the usual place was 'Toaster:3D'."
)
)
(set help_msg3
(cat "The Installer needs to know where to install the "
"AmigaGuide instructions.\n\nYou can install this "
"file anywhere you want. A new drawer called "
"GonzaMacros will be created.\n"
)
)
(set help_msg4
(cat "The Mouth Animation is used with the Exposure Sheet "
"macro.\n"
"All other animations are just examples of what some "
"of the macros can do.\n\n"
"Some buttons in the AmigaGuide instructions have links "
"to these animations. If you don't install them, then "
"those buttons will not work."
)
)
(set help_msg5
(cat "These picture files try to clarify even more the "
"AmigaGuide instructions. For example, there is "
"a group of images that show you graphically each "
"step in one tutorial.\n\n"
"Some buttons in the AmigaGuide instructions have links "
"to these pictures. If you don't install them, then "
"those buttons will not work."
)
)
(set user_startup_help
(cat "These commands need to be added to your User-"
"Startup file in order for the macros to "
"function properly. "
"These commands will then be automatically run at "
"boot up."
)
)
;****** Function Definitions ******
(procedure SET_SIZES
(
(set macros_size 300000)
(set macrolist_size 800)
(set guide_size 230000) ; guide + viewtek
(set pics_size 202000)
)
)
(procedure GETPATHMACROS
(set macros_dir
(askdir
(prompt "Please select the drive where you would "
"like to install Gonzalo Garramuño's Macro "
"Compilation. A new drawer called 'Gonzalo' "
"will be created there, if it does not exist.")
(default drive_macros)
(help help_msg1)
)
)
(set slash
(if (= ":" (substr macros_dir (- (strlen macros_dir) 1) 1))
""
"/"
)
)
(set macros_dir
(expandpath(macros_dir))
)
(set macros_dir
(cat macros_dir slash "Gonzalo")
)
(if (= 0 (exists macros_dir))
(makedir macros_dir (infos))
)
(set @default-dest macros_dir)
)
(procedure GETPATHMACROLIST
(set macrolist_dir
(askdir
(prompt "Please select the place where you would "
"like to install the file 'GonzaloMacroList'."
"This file is a list of the names of all the "
"macros and is used by Modeler.")
(default drive_macrolist)
(help help_msg2))
)
(set slash (if (= ":" (substr macrolist_dir
(- (strlen macrolist_dir) 1) 1))
""
"/"
)
)
)
(procedure GETPATHAMIGAGUIDELIST
(set guide_dir (askdir
(prompt "Please select the place where you would "
"like to install the AmigaGuide Instructions.\n"
"A new drawer called GonzaMacros will be created "
"there. Some utilities are also installed.")
(default guide_dir)
(help help_msg3)))
(set slash (if (= ":" (substr guide_dir
(- (strlen guide_dir) 1) 1))
""
"/"
)
)
)
(procedure INSTALLMACROS
(copyfiles
(source (cat source_dir "Macros"))
(dest (cat macros_dir))
(optional "fail" "force")
(all)
(infos)
)
)
(procedure INSTALLMACROLIST
(copyfiles
(source (cat source_dir "GonzaloMacroList"))
(dest (cat macrolist_dir))
(optional "fail" "force")
(infos)
)
)
(procedure INSTALLGUIDE
(set guide_dir
(cat guide_dir slash "GonzaMacros")
)
(set disk_avail (getdiskspace (cat (getdevice guide_dir) ":")))
(if (> guide_size disk_avail)
(WARNSIZE)
)
(copyfiles
(source (cat source_dir "GonzaloMacros.guide"))
(dest (cat guide_dir))
(optional "fail" "force")
(infos)
)
(copyfiles
(source (cat source_dir "Utils"))
(dest (cat guide_dir "/Utils"))
(all)
(optional "fail" "force")
(infos)
)
)
(procedure INSTALLANIMS
(set anim_dir (cat source_dir "Anims/"))
(set copyanims
(askoptions
(prompt "Which animations do you want to copy?")
(help help_msg4)
(choices "Mouth Animation (4K)"
"Patch This / Exposure Sheet Example (150K)"
"Break / Explosion Example (220K)"
)
(default 7)
)
)
(set guide_dir (cat guide_dir "/Anims"))
(if (BITAND copyanims 1)
(
(set disk_avail (getdiskspace (cat (getdevice guide_dir) ":")))
(if (> 400 disk_avail)
(WARNSIZE)
)
(copyfiles
(source (cat anim_dir "mouth.anim"))
(dest guide_dir)
(optional "fail" "force")
)
)
)
(if (BITAND copyanims 2)
(
(set disk_avail (getdiskspace (cat (getdevice guide_dir) ":")))
(if (> 150000 disk_avail)
(WARNSIZE)
)
(copyfiles
(source (cat anim_dir "chip.anim"))
(dest guide_dir)
(optional "fail" "force")
)
)
)
(if (BITAND copyanims 3)
(
(set disk_avail (getdiskspace (cat (getdevice guide_dir) ":")))
(if (> 220000 disk_avail)
(WARNSIZE)
)
(copyfiles
(source (cat anim_dir "explosion.anim"))
(dest guide_dir)
(optional "fail" "force")
)
)
)
)
(procedure INSTALLPICTURES
(set copypics
(askbool
(prompt "Do you want to copy the images used in the "
"AmigaGuide tutorials?")
(help help_msg5)
(default 1)
)
)
(if (= copypics 1)
(
(set disk_avail (getdiskspace (cat (getdevice guide_dir) ":")))
(if (> pics_size disk_avail)
(WARNSIZE)
)
(copyfiles
(source (cat source_dir "Pictures"))
(dest (cat guide_dir "/Pictures"))
(all)
(optional "fail" "force")
)
)
)
)
(procedure WARNSIZE
(message (cat "WARNING!!!\n\n"
"There may not be enough space on your drive to "
"install this part of the Macro Compilation. "
"Please make more space on your hard drive to "
"to finish the installation, before proceeding.\n\n"
"Click proceed to continue..."))
)
(procedure DOSTARTUP
(set start_lines
(cat "assign Gonzalo: " macros_dir " add\n")
)
(set start_lines
(cat start_lines "assign GonzaloList: " macrolist_dir)
)
(makeassign "Gonzalo" (cat (macros_dir)))
(makeassign "GonzaloList" (cat (macrolist_dir)))
(startup "Gonzalo Garramuño's Macro Compilation"
(command start_lines)
(help user_startup_help)
(prompt
(cat "\n\nThe following lines must be added to "
"your user-startup file:\n\n" start_lines
)
)
)
)
;****** Main Program ******
(welcome)
(complete 0)
(SET_SIZES)
(GETPATHMACROS)
(set disk_avail (getdiskspace (cat (getdevice macros_dir) ":")))
(if (> macros_size disk_avail)
(WARNSIZE)
)
(if (exists "Gonzalo:Curve2PolySeg.LWM" (noreq))
((delete "Gonzalo:Curve2PolySeg.LWM" (optional force))
(delete "Gonzalo:Curve2PolySeg.LWM.exe" (optional force))
(delete "Gonzalo:Curve2PolySeg.LWM.exe.info" (optional force))
)
)
(INSTALLMACROS)
(complete 50)
(GETPATHMACROLIST)
(set disk_avail (getdiskspace (cat (getdevice macros_dir) ":")))
(if (> macrolist_size disk_avail)
(WARNSIZE)
)
(INSTALLMACROLIST)
(complete 60)
(GETPATHAMIGAGUIDELIST)
(INSTALLGUIDE)
(complete 70)
(INSTALLPICTURES)
(complete 80)
(INSTALLANIMS)
(complete 90)
; Choose default tool for guide, depending on user's OS version
(set osversion (/ (getversion) 65536))
(if (>= osversion 39)
(set guide_reader "MultiView")
(set guide_reader "AmigaGuide")
)
(if (exists (tackon macrolist_dir "GonzaloMacros.guide.info") (noreq))
(
(tooltype
(dest (tackon macrolist_dir "GonzaloMacros.guide"))
(noposition)
(setdefaulttool guide_reader)
)
)
)
(DOSTARTUP)
(complete 95)
;(SHOWREADME)
(complete 100)